package com.huaxin.hxmodulesystem.mapping;

import com.huaxin.hxmodulesystem.dto.request.AddOrganizationReqDTO;
import com.huaxin.hxmodulesystem.dto.request.UpdateOrganizationReqDTO;
import com.huaxin.hxmodulesystem.dto.response.GetOrganizationInfoRespDTO;
import com.huaxin.hxmodulesystem.models.Organization;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

@Mapper(componentModel = "spring")
public interface OrganizationMapping {

    Organization toEntity(AddOrganizationReqDTO in);

    GetOrganizationInfoRespDTO toDTO(Organization entity);

    void updateEntity(UpdateOrganizationReqDTO in, @MappingTarget Organization entity);
}